<!--生产退料明细-->

<template>
    <div>
        <el-form :model="model"  ref="ruleForm" label-width="100px" class="demo-ruleForm page-form">
            <el-row>
                <el-col :span="8">
                    <el-form-item label="退料编号" prop="Number">
                        <el-input v-model="model.Number" :readonly="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="退料日期" prop="PickDate">
                        <el-input v-model="model.PickDate"  :readonly="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="退料仓库" prop="WarehouseName">
                        <el-input v-model="model.WarehouseName" :readonly="true"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>

            <el-row>
                <el-col :span="8">
                    <el-form-item label="订单状态" prop="Status">
                        <el-select v-model="model.Status" :disabled="true">
                            <el-option label="未审核" value="0"></el-option>
                            <el-option label="已审核" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="经办人" prop="EmployeesId">
                        <el-input v-model="model.EmployeesId" :readonly="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                     <el-form-item label="备注" prop="Remark">
                        <el-input v-model="model.Remark"  :readonly="true"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>


            <el-table :data="tableData" ref="dataForm" v-loading="isLoading" height="360" >
                <el-table-column  prop="ItemCode" label="编号" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="ItemName" label="名称" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Model" label="型号" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Spec" label="规格" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Kind" label="品类" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="UnitOfMeasure" label="单位" :show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="CurrCount" label="当前库存" :show-overflow-tooltip="true"></el-table-column>

                <el-table-column prop="Count" label="数量" :show-overflow-tooltip="true"></el-table-column>

                
            </el-table>


        </el-form>
 
    </div>



</template>

<script>


export default {
    props: {
        model: {
            require: true,
            type: Object,

        }
    },
    data() {
        return {
            
            
            //检测项目数据
            tableData: [],

            isLoading: false,
        }
    },
    //实例生命周期
    created() {
        console.log(this.model);
        this.GetOrderProductReceiveItemById()
    },
    methods: {
        

        //根据生产退料Id 返回产品数据
        GetOrderProductReceiveItemById() {
            this.isLoading=true;
            this.$http.get('/api/OrderProductReceive/GetOrderProductReceiveItemById',{
                params:{
                    OrderProductReceiveId:this.model.Id,
                    WarehouseId:this.model.WarehouseId
                }
            })
            .then(res => {
                this.isLoading=false;
                this.tableData = res.Data;
            })
        },
    }

}
</script>

<style>
</style>